﻿<UserControl 
    x:Class="ImageCropper.CroppingSurface"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:media="clr-namespace:System.Windows.Media;assembly=System.Windows"
    xmlns:Drawing2D="system.windows.d"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    mc:Ignorable="d"
    IsTabStop="True"
    d:DesignHeight="300" d:DesignWidth="400"    
    MouseLeftButtonDown="UserControl_MouseLeftButtonDown"
    MouseLeftButtonUp="UserControl_MouseLeftButtonUp"
    MouseRightButtonDown="UserControl_MouseRightButtonDown"    
    MouseMove="UserControl_MouseMove">    
    <Grid Background="Transparent">
        <Canvas x:Name="_canvas" Background="Transparent" RenderTransformOrigin="0.5, 0.5">
            <Canvas.RenderTransform>
                <TransformGroup>
                    <ScaleTransform x:Name="_scaleTransform" />
                    <!--CenterX="{Binding X, ElementName=_translateTransform}" CenterY="{Binding Y, ElementName=_translateTransform}"-->
                    <TranslateTransform x:Name="_translateTransform"/>
                </TransformGroup>
            </Canvas.RenderTransform>
        </Canvas>
        <Button Content="test" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="10" Click="Button_Click"/>
    </Grid>
</UserControl>
